package com.yuwei.home.adapter

import android.widget.ImageView
import androidx.databinding.BindingAdapter
import com.bumptech.glide.Glide

object CommonBindingAdapter {
    @JvmStatic
    @BindingAdapter("load_res_image")
    fun loadResImage(imageView: ImageView, res : Int?){
        if(res!=0){
            Glide.with(imageView.context).load(res).into(imageView)
        }
    }
    @JvmStatic
    @BindingAdapter("load_image")
    fun loadImage(imageView: ImageView, res : Int?){
        if(res!=0){
            Glide.with(imageView.context).load(res).into(imageView)
        }
    }
}